<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="../css/general.css" rel="stylesheet" type="text/css">
	<link href="../css/main.css" rel="stylesheet" type="text/css">
	<script type="text/javascript" src="../js/utils.js"></script>
	<script type="text/javascript" src=".//js/validator.js"></script>
	<script language="JavaScript">
		<!--
			var channel_name_empty = "通道名称不能为空!";
			var sync_url = "状态同步地址不能为空!";
			var price = "结算价格应为整数!";
			var code = "通道指令长号码不能为空!";
			var price_empty = "结算价格不能为空!";
			function validate()
			{
			    var validator = new Validator('add');
			    validator.required('name', channel_name_empty);
			    validator.required('syncURL', sync_url);
			    validator.required('code', code);
			    validator.required('price', price_empty);
			    validator.isInt('price', price);
			    return validator.passed();
			}
		
		//-->
		</script>
	<title></title>
</head>
<body>
	<h1>
		<span class="action-span"><a href="channelList">通道信息</a></span>
		<span class="action-span1">添加通道 </span>
		<div style="clear: both"></div>
	</h1>
	
	<div class="main-div">
		<form action="" method="post" name="add" onsubmit="return validate()">
		<table width="100%" id="general-table">
			<tbody><tr>
				<td class="label">通道名称：</td>
				<td><input type="text" name="name" maxlength="20" value="" size="25"> <font color="red">*</font></td>
			</tr>
			<tr>
				<td class="label">指令：</td>
				<td><input type="text" name="cmd" value="" size="20"> <font color="red">*</font></td>
			</tr>
			<tr>
				<td class="label">长号码：</td>
				<td><input type="text" name="code" value="" size="20"> <font color="red">*</font></td>
			</tr>
			<tr>
				<td class="label">下发接口地址：</td>
				<td><input type="text" name="mtURL" value="" size="60"></td>
			</tr>
			<tr>
				<td class="label">状态同步地址：</td>
				<td><input type="text" name="syncURL" size="60" value="${syncURL}"> <font color="red">*</font></td>
			</tr>
			<tr>
				<td class="label">上行同步地址：</td>
				<td><input type="text" name="moURL" size="60"></td>
			</tr>
			<tr>
				<td class="label">结算价格：</td>
				<td><input type="text" name="price" size="20">分 <font color="red">*</font></td>
			</tr>
			<tr>
				<td class="label">IP 地址：</td>
				<td><input type="text" name="ip" size="60"></td>
			</tr>
			<tr>
				<td class="label">通道状态：</td>
				<td><select name="status">
					<option value="1" selected="selected">合作中</option>
					<option value="0">终止合作</option>
				</select></td>
			</tr>
			<tr>
				<td class="label">通道描述：</td>
				<td><textarea rows="10" cols="50" name="desc"></textarea></td>
			</tr>
		</tbody></table>
		<div class="button-div"><input type="submit" value=" 确定 "> <input type="reset" value=" 重置 "></div>
		</form>
	</div>

</body>
</html>